package com.dgsrz.demo.util;

/**
 * Color utility
 * Reverse engineering from osu! ^_^
 *
 * @author dgsrz
 */
public class ColorUtils {

    public static Color makeOuterColor(final Color color) {
        return new Color(Math.min(255f, color.getR() / 1.1f),
                         Math.min(255f, color.getG() / 1.1f),
                         Math.min(255f, color.getB() / 1.1f),
                         180f);
    }

    public static Color makeInnerColor(final Color color) {
        return new Color(Math.min(255f, color.getR() * 1.125f + 255f * 0.25f),
                         Math.min(255f, color.getG() * 1.125f + 255f * 0.25f),
                         Math.min(255f, color.getB() * 1.125f + 255f * 0.25f),
                         180f);
    }
}
